package main;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
import java.util.Random;

import javax.crypto.KeyGenerator;
import javax.crypto.SecretKey;

public class Test {
	public static void main(String[] args) {
	File file = new File("/Users/wuxiaobin/git/lsp/lsp/wendang/2test.txt");
	try {
		FileInputStream fileInputStream = new FileInputStream(file);
		byte[] bytes1 = new byte[512];
		
		int l = fileInputStream.read(bytes1, 0,3);
		StringBuffer sb = new StringBuffer();
		sb.append(new String(bytes1));
		
//		fileInputStream.close();
		
		MakeFile.main2(3);
		
		File file2 = new File("/Users/wuxiaobin/git/lsp/lsp/wendang/3test.txt");
		
		FileOutputStream fileOutputStream = new FileOutputStream(file2);
		
		
		fileOutputStream.write(bytes1, 2,5);
		
		fileOutputStream.close();
		
	} catch (FileNotFoundException e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	} catch (IOException e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	}
	
	
		
		
	}
}
